OverrideSlavePdoConfiguration

Changes the input and output PDO length of the device to the new values. This can be used to programmatically set the configuration of a device.

Syntax

KsError OverrideSlavePdoConfiguration(
     int SlaveId,
     int InputLength,
     int OutputLength
);

Parameters

SlaveId: the slave index. This index value is automatically assigned by the KINGSTAR master when the EtherCAT network starts, based on the physical connection order. The first device connected directly to the master is assigned Index 0, followed by Index 1, Index 2, and so on. These indexes remain consistent within the slave array even if devices are added, removed, or reconnected. Please refer to the use cases in HotConnect, Repair, and Restart for more details.

InputLength: the length of the PDO input data.

OutputLength: the length of the PDO output data.

Return value

If the function succeeds, it returns errNoError, otherwise an error code. For more information about the error code, see the KsError list.

Usable EtherCAT states

ecatInit, ecatPreOP

Example

Copy
N/A

Requirements

  RT Win32
Minimum supported version 4.5 4.5
Header ksapi.h ksapi.h
Library KsApi_Rtss.lib KsApi.lib

See also

RequestState